package dao.impl;

import common.consts.Commons;
import dao.TradeCategoryDao;
import domain.TradeCategory;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created by aceyin on 15/7/9.
 */
@Repository
public class TradeCategoryDaoImpl extends BaseGenericDao<TradeCategory, Integer> implements TradeCategoryDao {
    @Override
    public List<TradeCategory> findByStatus(Commons.Status status) {
        Map<String, Object> params = newMapBuilder().put("status", status.name()).build();
        return queryList("find-by-status", params);
    }
}
